<?php

namespace app\api\Validate;

use think\Validate;

/**
 * 工作经历
 */
class UndergoValidate extends Validate
{
    protected $rule = [
        'name' => 'require',
        'id' => 'require',
        'industry' => 'require',
        'positiondate' => 'require',
        'position' => 'require',
        'content' => 'require',
        'is_practice' => 'require',
        'is_hide' => 'require',
    ];
    protected $message = [
        'name.require'  => '公司名称不能为空',
        'industry.require'  => '行业不能为空',
        'positiondate.require'  => '在职时间不能为空',
        'position.require'  => '职位名称不能为空',
        'content.require'  => '工作内容不能为空',
        'is_practice.require'  => '是否是实习不能为空',
        'is_hide.require'  => '是否对当前公司隐藏我信息不能为空',
    ];
    protected $scene = [
        'add' => [
            'name',
            'industry',
            'positiondate',
            'position',
            'content',
            'is_practice',
            'is_hide',
        ],
        'save' => [
            'id',
            'name',
            'industry',
            'positiondate',
            'position',
            'content',
            'is_practice',
            'is_hide',
        ],
    ];
}